#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>//水平
#include <QVBoxLayout>//垂直
#include <QTimer>
#include "ffmpeg.h"
#include "settings.h"
#include "screenthread.h"
#include "recordthread.h"
#include "screen.h"
#include "record.h"


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
private:
    QLabel *ShowLabel;//实时显示窗口
    QPushButton *PhotographBtn;//截屏
    QPushButton *OptionsBtn;//设置
    QPushButton *VideoBtn;//录制
    QPushButton *ExitBtn;//退出
    QPushButton *PhotoPreviewBtn;//截屏相册
    QPushButton *VideoPreviewBtn;//录制预览


    QHBoxLayout *BtnLayout;
    QVBoxLayout *AllLayout;
    QWidget *widget;
    //V4L2* m_v4l2;

    FFMPEG ffmpeg;
    settings setParameter;//设置窗口
    publicFile pf;//公共数据
    ScreenThread screenthread;//截屏线程
    RecordThread recordthread;//拍摄线程
    Screen screen;
    record recording;


    void deviceInit(void);//用于初始化pf

private slots:
    void receivelogin();
    void Photograph();
    void Video();
    void Options();
    void PhotoPreview();
    void VideoPreview();
    void showcamera(void);//实时显示函数

};

#endif // MAINWINDOW_H
